home *** CD-ROM | disk | FTP | other *** search
/ gdead.berkeley.edu / gdead.berkeley.edu.tar / gdead.berkeley.edu / pub / gdead / mac / SOD_1.8.7.sea.hqx / SOD 1.8.7 / Dead Shows / stack_-1.xml < prev   
Extensible Markup Language  |  1995-01-11  |  9KB  |  20 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>3029</cardID>
  8.     <listID>2296</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>--  Version 1.8.7on versionput line 1 of the script of this stackend versionon openStack----  This script will ensure that the config setup happens--  even if SOD is started by directly entering this stack--global soundOn, noGoif soundOn is empty thenlock screenpush this card--  Just going to this card sets it up via it's openCard handlerput true into noGogo card "Dead Config" of stack "Dead Utility"if soundOn is empty then    --  still empty ... we didn't make itsetDeadDefaultsend ifpop cardend ifhide messageend openStackon closeStackif there is a window "Show Utilities" thenif the visible of window "Show Utilities" is true then hide window "Show Utilities"end  ifend closeStackon setDeadDefaultsglobal soundOnglobal soundStackglobal deadDirglobal defFileCreator--put false into soundOnput "Dead Utility" into soundStackput empty into deadDirput "MACA" into defFileCreatorend setDeadDefaultson searchpush this cardset the lockScreen to truego card "song search utility" of stack "Dead Utility"selectStack "Shows"end searchfunction correctPosition checkType, songListif checkType = "" then   -- anywhere in stack...return trueend ifput SetPosition( Trim( field "songs" ) & return, ┬¼trim( songList ) & return ) into setPos-- put field "date" & "  -  " & setPos & "  :  " & checkTypeif checkType = "o1" then   -- open first setif setPos is "o1" or setPos is "i1" then return truereturn falseend ifif checkType = "c1" then   -- close first setif setPos is "c1" or setPos is "i1" then return truereturn falseend ifif checkType = "w1" then   -- anywhere in second setif char 2 of setPos is "1"  then return truereturn falseend ifif checkType = "o2" then    -- open second setif setPos is "o2" or setPos is "i2" then return truereturn falseend ifif checkType = "c2" then   -- close second setif setPos is "c2" or setPos is "i2" then return truereturn falseend ifif checkType = "w2" then   -- anywhere in second setif char 2 of setPos is "2" then return truereturn falseend ifif checkType = "e" then    -- encoreif second char of setPos is "e" then return truereturn falseend ifend correctPositionfunction beforeAndAfter theSongput Trim( field "songs" ) & return into setListrepeat with i = 1 to the number of lines in setListif ( line i of setList is theSong ) thenput line (i-1) of setList into beforeSongput line (i+1) of setList into afterSongif beforeSong is empty or afterSong is empty thenput SetPosition( setList, trim( theSong ) & return ) into setPosend ifif beforeSong is empty then put posWord( setPos ) into beforeSongif afterSong is empty then put posWord( setPos ) into afterSongreturn( beforeSong & " <> " & afterSong )end ifend repeatreturn emptyend beforeAndAfterfunction posWord setPosif char 1 of setPos is "o"  thenreturn( "Open " & char 2 of setPos )end ifif char 1 of setPos is "c"  thenreturn( "Close " & char 2 of setPos )end ifif setPos is "e"  thenreturn( "Encore" )end ifif char 1 of setPos is "i"  thenreturn( "Is set " & char 2 of setPos )end ifif char 1 of setPos is "w"  thenreturn( "Within set " & char 2 of setPos )end ifreturn ( "bogus" )end posWordfunction findShowByDate theShowDate--  a binary search through the cards.--  implemented when the stack got so large that brute force--  took way too longput the number of this card into origCardput theShowDate into searchDateconvert searchDate to dateitemsput item 1 of searchDate into theYear--  put theShowDate into searchDateconvert searchDate to seconds---- NEW--if ( theYear > 1900 ) then put theYear - 1900 into theYearrepeat with i = 1 to the number of lines in field "first of year"put line i of field "first of year" into theLineif ( piece( theLine, ":", 1 ) is theYear ) thenput piece( theLine, ":", 2 ) into begCardput line (i+1) of field "first of year" into theLineif theLine is "" thenput the number of cards into endCardelseput piece( theLine, ":", 2 ) into endCardend ifexit repeatend ifend repeat---- OLD WAY...-- put the number of cards into endCard-- put 1 into begCard--put "<" & begCard & "," & endCard & "> "put begCard + trunc( (endCard-begCard) / 2 ) into targetCardset the cursor to 4set the lockScreen to truerepeat forevergo card targetCardget field "date"if it is theShowDate then return trueconvert it to secondsif it > searchDate thenput the number of this card into endCardelseput the number of this card into begCardend ifif (endCard - begCard) < 2 thengo card begCardget field "date"convert it to secondsif it is searchDate then return truego next cardget field "date"convert it to secondsif it is searchDate then return truego card origCard--      answer "Show date not found!"exit repeatend ifput trunc( begCard + ((endCard - begCard) / 2) ) into targetCard--    put begCard & " : " & targetCard & " : " & endCardend repeathide the messagereturn falseend findShowByDateon jump howHighput the number of this card into cardNumput the number of cards into totCardsif howHigh is not empty thenadd howHigh to cardNumelseask "How High?"if it is empty then exit jumpadd it to cardNumend ifif (cardNum > 0 and cardNum <= totCards) then go card cardNumend jumpon singAndDanceplayRandomDeadrepeat while the sound is not doneshowBusywait 4end repeatend singAndDanceon dance durationif duration is empty then put 60 into durationrepeat for durationshowBusywait 4end repeatend danceon showBusyglobal bearNumadd 1 to bearNumif bearNum = 9 then put 1 into bearNumset cursor to "Bear" & bearNumend showBusy--  NOTE:  These scripts play songs from the stack specified in--         the configuration card in the utility stackon playDead songglobal soundStackpush this cardlock screenif soundStack is empty thenfindSoundStackend ifgo stack soundStackif the result is empty thenplayDeadSong songend ifpop cardend playDeadon playRandomDeadglobal soundStackpush this cardlock screenif soundStack is empty thenfindSoundStackend ifgo stack soundStackif the result is empty thenplayRandomDeadSongend ifpop cardend playRandomDead--  This handler manages help text for buttons and fields--  by taking the text from comments at the end of the scripts--on doHelpset the cursor to watchlock screenput "Help for " & the name of the target & "..." & return & return┬¼into field "help text"put the script of the target into theScript--repeat with i = 1 to the number of lines of theScript-- showBusyput line i of theScript into oneLineif oneLine is empty then next repeatif char 1 of oneLine is not "-" then exit repeatdelete char 1 to 2 of oneLineput oneLine & return after field "help text"end repeatshow field "help text"unlock screen with visual effect dissolve fastend doHelpon versionput line 1 of the script of this stackend version----  WARNING ... Anything past here can be deleted...--on fixsbput 0 into countput "Beer Barrel Polka" & return into theSongsfind string theSongs in field "songs"repeat foreverfixSetadd 1 to countgo next cardfind string theSongs in field "songs"if the result is not empty then exit repeatend repeatput count & " shows fixed..."end fixsbon fixSetrepeat with i = 1 to the number of lines in field "songs"showBusyif (line i of field "songs") is "Beer Barrel Polka" thendelete line i of field "songs"exit repeatend ifend repeatend fixSet---  stuff I don't really need--on sk orig, newer--  put "Mississippi Half-Step Uptown Toodeloo" into orig--  put "Mississippi Half-Step" into newerrepeat foreverfind string origput field "songs" into songListanswer "Replace?" with "OK" or "Skip" or "Cancel"if it is "Cancel" then exit repeatif it is "Skip" then next repeatrepeat with i = 1 to the number of lines in songListif line i of songList is orig thenput newer into line i of field "songs"exit repeatend ifend repeatanswer "Done" with "Cancel" or OKgo next cardend repeatend skon remSong theSongrepeat with i = 1 to the number of lines in field "songs"if line i of field "songs" is theSong thendelete line i of field "songs"exit repeatend ifend repeatend remSong</script>
  17.     <background id="2675" file="background_2675.xml" name="Show Card" />
  18.     <card id="3029" file="card_3029.xml" marked="false" name="" owner="2675" />
  19. </stack>
  20.